package spider;

import entity.PoemInfo;
import filehandler.PushIntoFile;
import org.junit.Test;

import java.util.List;

public class SpiderTest {
    @Test
    public void test(){
        List<PoemInfo> poemInfoList = PullFromWeb.pull("https://www.gushiwen.org/shiwen/default_3A666666666666A10aspx");
        PushIntoFile.push(poemInfoList);
    }

    @Test
    public void testThread(){
        for (int i=0;i<10;i++){
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(i);
        }
    }
}
